﻿using System;
using System.Linq;
using System.IO;
using System.IO.IsolatedStorage;
using System.Collections.Generic;
using Microsoft.LightSwitch;
using Microsoft.LightSwitch.Framework.Client;
using Microsoft.LightSwitch.Presentation;
using Microsoft.LightSwitch.Presentation.Extensions;
namespace LightSwitchApplication
{
    public partial class CreateResident
    {
        partial void ResidentListDeleteSelected_CanExecute(ref bool result)
        {
            // Write your code here.

        }

        partial void ResidentListDeleteSelected_Execute()
        {
            // Write your code here.
            System.Windows.MessageBoxResult result =
          this.ShowMessageBox("Are you sure that you want to delete ?", "Delete Confirm",
              MessageBoxOption.YesNo);
            if (result == System.Windows.MessageBoxResult.Yes)
            {
                Available.SelectedItem.Delete();
                Contracts.SelectedItem.Delete();

            }

        }
    }
}
